<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/2/14
 * Time: 8:39
 * 下载页面
 */

namespace Home\Controller;


use Admin\Model\AdvertModel;
use Admin\Model\ArticleModel;
use Admin\Model\ColumnModel;
use Base\Controller\BaseHomeController;

class DownController extends BaseHomeController
{
    protected $model;
    public function __construct()
    {
        parent::__construct();
        $this->model = new ColumnModel();
    }

    /**
     * 展示下载首页
     */
    function index(){
        $map['column_id'] = 0;
        $map['status'] = 1;
        $list = $this->model->relation(true)->where($map)->select();
        $advertModel = new AdvertModel();
        $result = $advertModel->select();
        $articleModel = new ArticleModel();
        $row = $articleModel->select();
        $this->assign('cList',$list);
        $this->assign('value',$result);
        $this->assign('article',$row);
//      print_r($list);
        $this->show('');
    }
    /**
     * 展示新闻中心
     */
    function news(){
        $news = new ArticleModel();
        $res = $news->select();
        $list = $this->model->relation(true)->select();
        $this->assign('dList',$list);
        $this->assign('nList',$res);
        $this->show('');
    }
    /**
     * 展示日间手术
     */
    function dayTime(){
        $list = $this->model->relation(true)->select();
        $articleModel = new ArticleModel();
        $res = $articleModel->select();
        $this->assign('dList',$list);
        $this->assign('aList',$res);
//        print_r($res);
        $this->show('');
    }
    /**
     * 医院详情
     */
function detail(){
    $list = $this->model->relation(true)->select();
    $articleModel = new ArticleModel();
    $res = $articleModel->select();
    $this->assign('dList',$list);
    $this->assign('bList',$res);
//    print_r($res);
    $this->show('');
}
}